package com.ruanyun.modular.admin.mapper;

import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.ruanyun.modular.admin.entity.TMeasures;
import com.ruanyun.modular.admin.model.params.TMeasuresParam;
import com.ruanyun.modular.admin.model.result.TMeasuresResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruanyun.modular.admin.model.result.TMonitoringinfoResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 措施信息 Mapper 接口
 * </p>
 *
 * @author zs
 * @since 2021-05-11
 */
@Repository
public interface TMeasuresMapper extends BaseMapper<TMeasures> {

    /**
     * 获取列表
     *
     * @author zs
     * @Date 2021-05-11
     */
    List<TMeasuresResult> customList(@Param("paramCondition") TMeasuresParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zs
     * @Date 2021-05-11
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") TMeasuresParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zs
     * @Date 2021-05-11
     */
    Page<TMeasuresResult> customPageList(@Param("page") Page page, @Param("paramCondition") TMeasuresParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author zs
     * @Date 2021-05-11
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") TMeasuresParam paramCondition);


    Page<TMeasuresResult> customPageList1(@Param("page") Page page, @Param("paramCondition") TMeasuresParam paramCondition);


    Page<TMeasuresResult> getMeasurePage(@Param("pageContext") Page pageContext, @Param("measureParam") TMeasuresParam measuresParam);


    @Select("select\n" +

            "    *    from t_measures where del_flag != 2\n" +
            "        AND red_id =  #{redId}")
    List<TMeasuresResult> getMeasureList(@Param("redId") Integer redId);

    TMeasuresResult measureHeadInfo(@Param("rid") Integer rid);


}
